home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1998 June / SGI Freeware 1998 June.iso / dist / fw_ATxgopher.idb / usr / freeware / src / xgopher.1.3 / R6patch.z / R6patch / text0000.txt < prev   
Encoding:
Text File  |  1998-01-21  |  4.5 KB  |  183 lines

  1. I could not build xgopher-1.3.2 under X11R6 because the file KeyWSink.c
  2. was giving me compiler errors. I contacted the author, Allan Tuchman
  3. <tuchman@vidda.cso.uiuc.edu>. He told me KeyWSink.c is a superclass of
  4. the Athena Text Sink widget, and is dependent on the superclass's
  5. data. He also suggested I try disabling the widget, since it is only
  6. used to highlight the index search words in a text display.
  7.  
  8. The following patch changes 2 files (Imakefile and text.c) so that
  9. xgopher can compile under X11R6.
  10.  
  11. To apply the patch, cd to your xgopher1.3 source, and run patch < this-file
  12.  
  13. ====================== cut here ================================
  14.  
  15. *** orig/Imakefile    Mon Jun  7 14:39:13 1993
  16. --- Imakefile    Thu May 12 16:41:16 1994
  17. ***************
  18. *** 36,41 ****
  19. --- 36,49 ----
  20.    **    $(HELP_FILE) is path to help file; usually /usr/lib/X11/Xgopher **
  21.    *************************************************************************/
  22.   
  23. + #if ProjectX < 6
  24. + KEYSOURCE = KeyWSink.c
  25. + KEYOBJECT = KeyWSink.o
  26. + #else
  27. + KEYSOURCE = 
  28. + KEYOBJECT =
  29. + #endif
  30.   RESOURCE_DEFINES= -DHELP_FILE=\"$(XGOPHERDIR)/xgopher.help\"
  31.           DEFINES = $(RESOURCE_DEFINES) $(LOCAL_DEFINES)
  32.   
  33. ***************
  34. *** 50,56 ****
  35.             sc_dir.c sc_index.c sc_telnet.c sc_tn3270.c \
  36.             sc_cso.c sc_image.c sc_sound.c sc_text.c sc_binary.c \
  37.             sc_extend.c \
  38. !                   KeyWSink.c
  39.   
  40.              OBJS = xgopher.o item.o itemList.o dir.o dirList.o markList.o \
  41.                     util.o misc.o net.o \
  42. --- 58,64 ----
  43.             sc_dir.c sc_index.c sc_telnet.c sc_tn3270.c \
  44.             sc_cso.c sc_image.c sc_sound.c sc_text.c sc_binary.c \
  45.             sc_extend.c \
  46. !           $(KEYSOURCE)
  47.   
  48.              OBJS = xgopher.o item.o itemList.o dir.o dirList.o markList.o \
  49.                     util.o misc.o net.o \
  50. ***************
  51. *** 61,67 ****
  52.             sc_dir.o sc_index.o sc_telnet.o sc_tn3270.o \
  53.             sc_cso.o sc_image.o sc_sound.o sc_text.o sc_binary.o \
  54.             sc_extend.o \
  55. !               KeyWSink.o
  56.   
  57.   ComplexProgramTarget(xgopher)
  58.   
  59. --- 69,75 ----
  60.             sc_dir.o sc_index.o sc_telnet.o sc_tn3270.o \
  61.             sc_cso.o sc_image.o sc_sound.o sc_text.o sc_binary.o \
  62.             sc_extend.o \
  63. !           $(KEYOBJECT)
  64.   
  65.   ComplexProgramTarget(xgopher)
  66.   
  67. *** orig/text.c    Mon Jun  7 14:27:54 1993
  68. --- text.c    Thu May 12 16:33:43 1994
  69. ***************
  70. *** 32,43 ****
  71.   #include <X11/Xaw/Viewport.h>
  72.   #include <X11/Shell.h>
  73.   
  74. ! #include "KeyWSink.h"
  75.   
  76.   #include "conf.h"
  77.   #include "osdep.h"
  78.   #include "appres.h"
  79. - #include "compatR4.h"
  80.   #include "xglobals.h"
  81.   #include "text.h"
  82.   #include "misc.h"
  83. --- 32,48 ----
  84.   #include <X11/Xaw/Viewport.h>
  85.   #include <X11/Shell.h>
  86.   
  87. ! #include "compatR4.h"
  88. ! #if XtSpecificationRelease > 5
  89. ! #define XGOPHER_X11R6        /* KeySink widget won't compile under R6 yet */
  90. ! #else
  91. ! #include "KeyWSink.h"        /* KeySink works fine for R4 & R5 */
  92. ! #endif
  93.   
  94.   #include "conf.h"
  95.   #include "osdep.h"
  96.   #include "appres.h"
  97.   #include "xglobals.h"
  98.   #include "text.h"
  99.   #include "misc.h"
  100. ***************
  101. *** 477,482 ****
  102. --- 482,488 ----
  103.                       textForm, args, n);
  104.           setTextWidgetSize(tep->textDisplay, 80, 24);
  105.   
  106. + #ifndef XGOPHER_X11R6
  107.           /* add the key word sink */
  108.           {
  109.   #define            TAB_COUNT    32    /* same as in AsciiText.c */
  110. ***************
  111. *** 495,500 ****
  112. --- 501,507 ----
  113.               XtSetArg(args[n], XtNtextSink, kwSink);  n++;
  114.               XtSetValues(tep->textDisplay, args, n);
  115.           }
  116. + #endif
  117.   
  118.   
  119.       /* create DONE button */
  120. ***************
  121. *** 682,687 ****
  122. --- 689,695 ----
  123.       tep->stringValue = NULL;
  124.       saveItemInfo(&(tep->origFields), gi, title);
  125.   
  126. + #ifndef XGOPHER_X11R6
  127.       /* set keyword resource in text sink */
  128.   
  129.       n = 0;
  130. ***************
  131. *** 691,696 ****
  132. --- 699,705 ----
  133.       n = 0;
  134.       XtSetArg(args[n], XtNwordList, NULL);  n++;
  135.       XtSetValues(kwSink, args, n);
  136. + #endif
  137.   
  138.       /* set title and file name */
  139.   
  140. ***************
  141. *** 746,751 ****
  142. --- 755,761 ----
  143.       saveItemInfo(&(tep->origFields), gi, title);
  144.   
  145.   
  146. + #ifndef XGOPHER_X11R6
  147.       /* set keyword resource in text sink */
  148.   
  149.       n = 0;
  150. ***************
  151. *** 761,766 ****
  152. --- 771,777 ----
  153.           XtSetArg(args[n], XtNwordList, tep->wordList);  n++;
  154.       }
  155.       XtSetValues(kwSink, args, n);
  156. + #endif
  157.   
  158.       /* set title and file name */
  159.   
  160. ***************
  161. *** 808,813 ****
  162. --- 819,825 ----
  163.       tep->stringValue   = string;
  164.       saveItemInfo(&(tep->origFields), gi, title);
  165.   
  166. + #ifndef XGOPHER_X11R6
  167.       /* set keyword resource in text sink */
  168.   
  169.       n = 0;
  170. ***************
  171. *** 817,822 ****
  172. --- 829,835 ----
  173.       n = 0;
  174.       XtSetArg(args[n], XtNwordList, NULL);  n++;
  175.       XtSetValues(kwSink, args, n);
  176. + #endif
  177.   
  178.       /* set title and file name */
  179.   
  180.  
  181.